<%-- 
    Document   : sidebar
    Created on : Apr 20, 2012, 1:39:56 AM
    Author     : duongna
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
    <body>
        <div id="sidebar">
            <div class ="profile_box">
                <a id="avatar" href="ViewPersonalInfo" >
                    <img src="${sessionScope.account.avatar}" height="250" width="250"> 
                </a>
            </div>

            <div class="news_box">
                <a href="ViewFriendList">
                    <h3 align="center">Friend list (${sessionScope.account.numOfFriends})</h3>
                </a>

                <table>
                    <c:forEach var="friend" items="${sessionScope.account.someFriends}">
                        <tr>
                            <td width="90">
                                <a href="
                                   <c:url value="/ViewPersonalInfo">
                                       <c:param name="accountId" value="${friend.accountId}"/>
                                   </c:url>
                                   ">
                                    <img src="${friend.avatar}" height="70" width="70">
                                </a>
                            </td>
                            <td valign="top">
                                <a href=" <c:url value="/ViewPersonalInfo">
                                       <c:param name="accountId" value="${friend.accountId}"/>
                                   </c:url>">${friend.username}</a>
                            </td>
                        </tr>
                    </c:forEach>
                </table>
            </div>
            <div class="cleaner"></div> 
        </div>
    </body>
</html>